package com.jet.member.gate;

import com.jet.core.result.ResultJson;
import com.jet.member.domain.entity.MemberTag;
import com.jet.member.service.IMemberTagService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/gate/member/tag")
public class GateMemberTagController {

    private final IMemberTagService memberTagService;

    public GateMemberTagController(IMemberTagService memberTagService) {
        this.memberTagService = memberTagService;
    }

    @GetMapping("/list")
    public ResultJson<List<MemberTag>> list(@RequestHeader long merchantNo,
                                            @RequestHeader long storeNo,
                                            @RequestHeader String accountId) {
        return ResultJson.ok(memberTagService.findAll(merchantNo));
    }
}
